package chapter006;

/**
 * 二维数组
 *
 * @author Jack魏
 */
public class Point02 {
    public static void main(String args[]) {
        //二维数组
        int data[][] = new int[][] {{1, 2, 3}, {4, 5}, {6, 7, 8, 9}};
        //遍历时要使用双重循环，
        //外循环行数，内循环列数
        for(int i = 0; i < data.length; i++) {
            for(int j = 0; j < data[i].length; j++) {
                System.out.print("data[" + i + "][" + j + "]=" + data[i][j] + " | ");
            }
            System.out.println();
        }
    }
}
